package com.qcby.demo.proxyaop.controller;

import com.qcby.demo.proxyaop.aop.SelfRecords;
import com.qcby.demo.proxyaop.aop.ViewRecords;
import com.qcby.demo.proxyaop.web.Constant;
import com.qcby.demo.proxyaop.web.ResultJson;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @className: DemoController
 * @description:
 * @author: lxt
 * @create: 2021-05-12 18:10
 **/
@RestController
@RequestMapping("demo0513")
@Slf4j
public class Demo0513Controller {


    /**
     * 浏览
     * @param id
     * @return
     */
    @SelfRecords
    @RequestMapping
    public ResultJson view(Long id){
        log.info("===============>id:{}",id);
        return ResultJson.ok(id);
    }

    /**
     * 下载
     * @param id666
     * @return
     */
    @SelfRecords(type = Constant.DOWN_TYPE,id = "id666")
    @RequestMapping("down")
    public ResultJson down(Long id666){
        log.info("===============>id666:{}",id666);
        return ResultJson.ok(id666);
    }


}
